package com.chapter13.homework.demo3;

import java.util.HashSet;

public class Student {
    private HashSet<Course> hs;

    public Student(HashSet<Course> hs) {
        this.hs = hs;
    }

    public void addCourse(Course c){
        hs.add(c);
    }

    public void removeCourse (String name){
        Course c = hs.iterator().next();
        if (c.getName().equals(name)){
            hs.remove(c);
        }

    }
}
